package com.chandra.pos.employee.dao.entity;


import com.chandra.pos.model.PosEntity;

import javax.persistence.*;

/**
 * UserEntity: chandra shekher kumar
 * Date: 6/1/12
 * Time: 11:50 AM
 * To change this template use File | Settings | File Templates.
 */


@Entity
@Table(name = "USER_ROLES")
public class EmployeeRole extends PosEntity {

    @Column(name="ROLE_ID", unique = false, nullable = false)
    private Long roleId;

    @ManyToOne(cascade = CascadeType.DETACH)
    @JoinColumn(name = "ROLE_ID", nullable = true,  insertable = false, updatable = false)
    private Role role;

    @Column(name="EMPLOYEE_ID", unique = false, nullable = false)
    private Long employeeId;


    @ManyToOne(cascade = CascadeType.DETACH)
    @JoinColumn(name = "EMPLOYEE_ID", nullable = true,  insertable = false, updatable = false)
    private Employee employee;

    @Column(name="NOTE", unique = false, nullable = true)
    private String note;

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Long getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Long employeeId) {
        this.employeeId = employeeId;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Employee getEmployee() {
        return employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }
}
